#include <vector>
#include <iostream>
using namespace std;
int main()
{
    std::ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, x;
    cin >> n >> x;
    vector<int> nums(n);
    for (auto &ch : nums)
        cin >> ch;
    long long int sum = 0, len = 1e7 + 10, left = 0, right = 0;
    long long int leftindex = 1e7 + 10;
    for (left = 0, right = 0; right < n;)
    {
        sum += nums[right++];
        while (sum >= x)
        {
            int curlen=right-left;
            if(curlen<len)
            {
                len=curlen;
                leftindex=left;
            }
            else if(curlen==len)
            {
                if(left<leftindex)
                {
                    leftindex=left;
                }
            }
            sum -= nums[left++];
        }
    }
    cout << leftindex+1 << " " << leftindex + len ;
    return 0;
}